from param_parser import parameter_parser
from utils import tab_printer
from simgnn import SimGNNTrainer
from dataHandle import DataHandle

if __name__ == "__main__":
    args = parameter_parser()
    tab_printer(args)
    dataHandle = DataHandle(args)
    if not args.exist_newData:
        dataHandle.formatGrahpInfo()

    if not args.exist_graph_pair:
        dataHandle.generatorGraphPair()
        dataHandle.generatorGraphPairTest()

    trainer = SimGNNTrainer(args)

    if args.load_path:
        trainer.load()
    else:
        trainer.fit()
    trainer.score()
    if args.save_path:
        trainer.save()